<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>上传</title>
    <link rel="stylesheet" href="/layui/css/layui.css"  media="all">
    <link rel="stylesheet" href="/css/public.css" media="all" />
</head>
<body>
<script src="/layui/layui.js" charset="utf-8"></script>
<script src="/js/common/jquery-3.4.1.js"></script>

<!--添加的form页面 start-->
<form class="layui-form" id="addForm" >
    <div class="layui-form-item">
        <label class="layui-form-label">社团名称</label>
        <div class="layui-input-inline">
            <input type="text" name="a_name"  required  lay-verify="required" placeholder="请输入社团名称" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">社长学号</label>
        <div class="layui-input-inline">
            <input type="text" name="username"  required lay-verify="required" placeholder="请输入社长学号" autocomplete="off" class="layui-input">
        </div>
        <div class="layui-form-mid layui-word-aux">12位</div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">创建时间</label>
        <div class="layui-input-inline">
            <input type="text" name="creationtime" id="creationtime" readonly="readonly" required lay-verify="required"  autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item" style="display: none">
        <label class="layui-form-label">社团人数</label>
        <div class="layui-input-inline">
            <input type="radio" name="number" value="1" title="创建时默认为1" checked />
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">图片地址</label>
        <div class="layui-input-inline">
            <!--			<input type="text" name="a_url"  required lay-verify="required"  autocomplete="off" class="layui-input">-->
            <button type="button" class="layui-btn" id="addUpload">
                <i class="layui-icon">&#xe67c;</i>上传图片
            </button>
        </div>
    </div>

    <div class="layui-form-item" style="display: none">
        <label class="layui-form-label">社团状态</label>
        <div class="layui-input-inline">
            <input type="radio" name="examine" value="1" title="等待审核" checked />
            <input type="radio" name="examine" value="0" title="审核通过"  />
        </div>
    </div>



    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="add">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
<!--添加的form页面 end-->
<button type="button" class="layui-btn" id="addUpload1">
    <i class="layui-icon">&#xe67c;</i>上传图片
</button>
<script>
    layui.use(['table', 'layer', 'form', 'laydate', 'upload'], function () {
        var table = layui.table;
        var layer = layui.layer;
        var form = layui.form;
        var laydate = layui.laydate;
        var upload = layui.upload;
        // addForm表单的文件上传--start
        upload.render({
            elem:'#addUpload',
            url:'ems/upload',
            	//默认是file
            done:function (res) {	//上传成功之后执行
                console.log(res);
            }
        })

        //addForm表单的文件上传--end
    })
</script>


</body>
</html>